package logger

import (
	log "github.com/sirupsen/logrus"
	"fmt"
)

type formatter struct {
}

func (f *formatter) Format(entry *log.Entry) ([]byte, error) {
  return []byte(fmt.Sprintf("%s[%s] %s\n", entry.Level.String(), entry.Time.Format("2006-01-02 15:04:05"), entry.Message)), nil
}

func init() {
	log.SetFormatter(new(formatter))
	log.SetLevel(log.DebugLevel)
}